package com.example.studydemo

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.example.studydemo.customview.TagView
import kotlinx.android.synthetic.main.activity_layout_demo.*

class LayoutDemoActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_layout_demo)
        btn_add.setOnClickListener {
            val newTagView = TagView(this)
            newTagView.text=et_clear.text
            et_clear.text=null
            fl_demo.addView(newTagView)
        }
    }
}